<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
    <script>
        //兼容：ie678不兼容【es5方法】
        function myFunction() {
            var fruits = ["Banana", "Orange", "Apple", "Mango"];
            x = Array.isArray(fruits);
            console.log(x);
        }
        myFunction(); //true
    </script>
</body>

</html>